#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time    : 2019-08-27 08:41
# @Author  : yuxuecheng
# @Contact : yuxuecheng@xinluomed.com
# @Site    : 
# @File    : example1.py
# @Software: PyCharm
# @Description 例一

import tensorflow as tf
from tensorflow.python import keras
from tensorflow.python.keras.datasets import fashion_mnist

from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt

(x_train, y_train), (x_test, y_test) = fashion_mnist.load_data()
x_train, x_test = x_train / 255.0, x_test / 255.0

print(x_train.shape)
print(x_test.shape)
print(y_train.shape)
print(y_test.shape)

class_names = ["T-shirt/top", "Trouser", "Pullover",
               "Dress", "Coat", "Sandal", "Shirt",
               "Sneaker", "Bag", "Ankle boot"]

print(class_names[y_train[0]])

plt.imshow(x_train[0])
plt.savefig('train_0.jpg')
